Skip to content

EPMRPP-107835 || Add hasNestedSteps flag#22

Merged
Evelina02 merged 3 commits intodevelopfrom
EPMRPP-107835-add-flag-to-test-item
Sep 19, 2025
Merged

EPMRPP-107835 || Add hasNestedSteps flag#22
Evelina02 merged 3 commits intodevelopfrom
EPMRPP-107835-add-flag-to-test-item

Conversation

@Evelina02
Copy link
Contributor

@Evelina02 Evelina02 commented Sep 17, 2025

Summary by CodeRabbit

  • New Features

    • Test item API responses now include a hasNestedSteps flag so clients can detect items that contain nested steps while remaining backward-compatible.
  • Style

    • Minor import-order cleanup with no impact on functionality or user experience.

@coderabbitai
Copy link

coderabbitai bot commented Sep 17, 2025

Walkthrough

Added a primitive boolean property hasNestedSteps to TestItemResource with @JsonProperty("hasNestedSteps"); Lombok generates accessor methods. Lombok import order was adjusted. No control-flow or runtime logic changes. (42 words)

Changes

Cohort / File(s) Summary of Changes
Reporting DTO
src/main/java/com/epam/ta/reportportal/ws/reporting/TestItemResource.java
Added field private boolean hasNestedSteps annotated with @JsonProperty("hasNestedSteps"); Lombok-generated getter/setter apply. Reordered Lombok import statements (formatting only).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

I twitch my whiskers at a tiny flag so neat,
A boolean hop that makes the JSON complete.
Lombok lends a paw, accessors in tow,
I nibble a carrot and quietly go. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "EPMRPP-107835
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch EPMRPP-107835-add-flag-to-test-item

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 61fd4d8 and d184525.

📒 Files selected for processing (1)
  • src/main/java/com/epam/ta/reportportal/ws/reporting/TestItemResource.java (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/java/com/epam/ta/reportportal/ws/reporting/TestItemResource.java

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
src/main/java/com/epam/ta/reportportal/ws/reporting/TestItemResource.java (2)

27-29: Nit: keep import order consistent with project style

Reordering imports is a no-op; just ensure it matches the repo’s Checkstyle/Spotless rules to avoid CI noise. If the project groups imports (java., javax., third‑party, project, lombok), please align accordingly.


119-121: New flag hasNestedSteps: confirm serialization/defaults and population path

  • With @JsonInclude(Include.NON_NULL) and a primitive boolean, hasNestedSteps will always serialize (false included). This mirrors hasChildren/hasStats; confirm that’s desired for clients.
  • Verify the service layer/populators actually set this flag; otherwise clients may always see false even when nested steps exist.
  • TestItemResourceOld extends this class, so the flag will also appear in the “old” representation. Confirm that exposing it there is intentional.
  • If you want to omit when unknown, consider Boolean (nullable) or @JsonInclude(Include.NON_DEFAULT). If consistency with existing booleans is the priority, current choice is fine.
  • Minor: for readability, consider placing this field near hasChildren/hasStats.

I can add a couple of JSON (de)serialization tests to lock the contract if helpful.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between abffa2e and 2c1d4b4.

📒 Files selected for processing (1)
  • src/main/java/com/epam/ta/reportportal/ws/reporting/TestItemResource.java (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/main/java/com/epam/ta/reportportal/ws/reporting/TestItemResource.java (1)
src/main/java/com/epam/ta/reportportal/ws/reporting/TestItemResourceOld.java (1)
  • Getter (35-50)

@Evelina02 Evelina02 merged commit 8a054ff into develop Sep 19, 2025
2 checks passed
@Evelina02 Evelina02 deleted the EPMRPP-107835-add-flag-to-test-item branch September 19, 2025 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants